<template>
    <el-container>
        <el-header>
            <div class="card">
                <div class="card_left">
                    <div class="cicle">
                        <el-icon>
                            <HomeFilled />
                        </el-icon>
                    </div>
                </div>
                <div class="card_right">
                    <div class="saleAll">$1889011.00</div>
                    <div class="upordown">
                        <el-icon class="getColor">
                            <Top />
                        </el-icon>
                        <span class="getColor">15%</span>
                    </div>
                </div>
            </div>
            <div class="card">
                <div class="card_left">
                    <div class="cicle">
                        <el-icon>
                            <WarnTriangleFilled />
                        </el-icon>
                    </div>
                </div>
                <div class="card_right">
                    <div class="saleAll">$10231.00</div>
                    <div class="upordown">
                        <el-icon class="getColor1">
                            <Top />
                        </el-icon>
                        <span class="getColor1">10%</span>
                    </div>
                </div>
            </div>
            <div class="card">
                <div class="card_left">
                    <div class="cicle">
                        <el-icon>
                            <StarFilled />
                        </el-icon>
                    </div>
                </div>
                <div class="card_right">
                    <div class="saleAll">22350</div>
                    <div class="upordown">
                        <el-icon class="getColor">
                            <Top />
                        </el-icon>
                        <span class="getColor">30%</span>
                    </div>
                </div>
            </div>
            <div class="card">
                <div class="card_left">
                    <div class="cicle">
                        <el-icon>
                            <Grid />
                        </el-icon>
                    </div>
                </div>
                <div class="card_right">
                    <div class="saleAll">11021</div>
                    <div class="upordown">
                        <el-icon class="getColor">
                            <Top />
                        </el-icon>
                        <span class="getColor">20%</span>
                    </div>
                </div>
            </div>

        </el-header>
        <el-main>
            <div class="main_left">
                <el-calendar>
                    <template #date-cell="{ data }">
                        <p :class="data.isSelected ? 'is-selected' : ''">
                            {{ data.day.split('-').slice(1).join('-') }}
                            {{ data.isSelected ? '✔️' : '' }}
                        </p>
                    </template>
                </el-calendar>
            </div>
            <div class="main_right">
                <div class="main_right_top" style="width: 100%; height: 100%;">
                     <h2>店内营业额占采购金额比</h2>
                    <div class="proBox">
                        <el-progress type="dashboard" :percentage="80">
                            <template #default="{ percentage }">
                                <span class="percentage-value">{{ percentage }}%</span>
                                <span class="percentage-label">Progressing</span>
                            </template>
                        </el-progress>
                    </div>
                </div>
                <div class="main_right_bottom">
                    <h2>往年销售量</h2>
                    <div class="demo-progress line">
                        <el-progress :text-inside="true" :stroke-width="26" :percentage="70" />
                        <el-progress :text-inside="true" :stroke-width="24" :percentage="100" status="success" />
                        <el-progress :text-inside="true" :stroke-width="22" :percentage="80" status="warning" />
                        <el-progress :text-inside="true" :stroke-width="20" :percentage="50" status="exception" />
                    </div>

                </div>
            </div>
        </el-main>
    </el-container>
</template>

<script>
    export default {
        name: 'YaodaoShop',

        data() {
            return {

            };
        },

        mounted() {

        },

        methods: {

        },
    };
</script>

<style lang="scss" scoped>
    .demo-progress .el-progress--line {
        margin-bottom: 15px;
        width: 350px;
    }

    .el-header {
        width: 100%;
        height: 100px;
        display: flex;

        .card {
            flex: 1;
            background-color: #fff;
            display: flex;

            &:nth-child(n+1) {
                margin-left: 10px;
            }

            .card_left {
                position: relative;
                flex: 1;

                .cicle {
                    width: 70px;
                    height: 70px;
                    border-radius: 50%;
                    background-color: #E1E4FB;
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);

                    .el-icon {
                        position: absolute;
                        top: 50%;
                        left: 50%;
                        transform: translate(-50%, -50%);
                        font-size: 20px;
                        color: #5B6BE8;
                        font-weight: 600;
                    }
                }
            }

            .card_right {
                flex: 2;
                display: flex;

                div {
                    flex: 1;
                    line-height: 100px;
                    text-align: center;
                    font-size: 20px;
                    font-weight: bolder;
                    font-family: 'rubik';
                }

                .upordown {
                    font-size: 16px;
                }

                .getColor {
                    color: red;
                }

                .getColor1 {
                    color: green;
                }
            }
        }
    }

    .el-main {
        display: flex;
        height: 200px !important;


        .main_left {
            flex: 3.05;
            background-color: #fff;
            margin-left: 10px;
            position: relative;

            .is-selected {
                color: #1989fa;
            }

            .el-calendar {
                height: 200px !important;
                position: absolute;
                top: 8%;
                font-size: 16px;
                font-family: rubik;
                font-weight: bold;
            }
        }

        .main_right {
            flex: 1;
            /* background-color: #fff; */
            margin-left: 10px;
            flex-direction: column;
            display: flex;

            div {
                flex: 1;
                background-color: #fff;

                &:last-child {
                    margin-top: 10px;
                }
            }
        }

        .main_right_top {
            position: relative;
            .proBox {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
            }
        }


    }


    /deep/.el-progress-circle {
        width: 200px !important;
        height: 200px !important;
    }

    .proBox {
        background-color: red;
    }

    .percentage-value {
        display: block;
        margin-top: 10px;
        font-size: 28px;
    }

    .percentage-label {
        display: block;
        margin-top: 10px;
        font-size: 12px;
    }

    .demo-progress .el-progress--line {
        margin-bottom: 15px;
        width: 350px;
    }

    .demo-progress .el-progress--circle {
        margin-right: 15px;
    }
    .line{
        margin-top: 100px !important;
        /* width: 100%; */
        margin-left: 20px;
    }
</style>